package cn.edu.nankai.bookstore.domain.po;

import java.io.Serializable;
import java.util.Date;

public class Order implements Serializable {
    private int orderId;
    private int customerId;
    private Date dealTime;
    private int receiverId;
    private double totalPrice;
    private double discountTotalPrice;
    private boolean isSubmitted;

    public Order(int orderId, int customerId, Date dealTime, int receiverId, double totalPrice, double discountTotalPrice, boolean isSubmitted) {
        this.orderId = orderId;
        this.customerId = customerId;
        this.dealTime = dealTime;
        this.receiverId = receiverId;
        this.totalPrice = totalPrice;
        this.discountTotalPrice = discountTotalPrice;
        this.isSubmitted = isSubmitted;
    }

    public boolean isSubmitted() {
        return isSubmitted;
    }

    public void setSubmitted(boolean submitted) {
        isSubmitted = submitted;
    }

    public Order(int customerId, Date dealTime, int receiverId, double totalPrice, double discountTotalPrice, boolean isSubmitted) {
        this.customerId = customerId;
        this.dealTime = dealTime;
        this.receiverId = receiverId;
        this.totalPrice = totalPrice;
        this.discountTotalPrice = discountTotalPrice;
        this.isSubmitted = isSubmitted;
    }

    public Order() {
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getCustomerId() {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }

    public int getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(int receiverId) {
        this.receiverId = receiverId;
    }

    public Date getDealTime() {
        return dealTime;
    }

    public void setDealTime(Date dealTime) {
        this.dealTime = dealTime;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getDiscountTotalPrice() {
        return discountTotalPrice;
    }

    public void setDiscountTotalPrice(double discountTotalPrice) {
        this.discountTotalPrice = discountTotalPrice;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId=" + orderId +
                ", customerId=" + customerId +
                ", receiverId=" + receiverId +
                ", deal_time=" + dealTime +
                ", totalPrice=" + totalPrice +
                ", discountTotalPrice=" + discountTotalPrice +
                ", isSubmitted=" + isSubmitted +
                '}';
    }
}